package com.partvoyage.client.mvp2.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class CarteZoomEvent extends
		GwtEvent<CarteZoomEvent.CarteZoomEventHandler> {
	public static Type<CarteZoomEventHandler> TYPE = new Type<CarteZoomEventHandler>();

	public interface CarteZoomEventHandler extends EventHandler {
		void onZoom(CarteZoomEvent event);
	}

	private String adresse;
	private Integer zoomLevel;

	public CarteZoomEvent(String adresse, Integer zoomLevel) {
		this.adresse = adresse;
		this.zoomLevel = zoomLevel;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<CarteZoomEventHandler> getAssociatedType() {
		return TYPE;
	}

	public String getAdresse() {
		return adresse;
	}

	public Integer getZoomLevel() {
		return zoomLevel;
	}

	@Override
	protected void dispatch(CarteZoomEventHandler handler) {
		handler.onZoom(this);

	}
}
